package com.orientsec.autotest.project.system.systemSqlquery.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.orientsec.autotest.project.system.systemSqlquery.mapper.SystemSqlqueryMapper;
import com.orientsec.autotest.project.system.systemSqlquery.domain.SystemSqlquery;
import com.orientsec.autotest.project.system.systemSqlquery.service.ISystemSqlqueryService;
import com.orientsec.autotest.common.utils.text.Convert;

/**
 * sql查询语句 服务层实现
 * 
 * @author autotest
 * @date 2019-12-18
 */
@Service
public class SystemSqlqueryServiceImpl implements ISystemSqlqueryService 
{
	@Autowired
	private SystemSqlqueryMapper systemSqlqueryMapper;

	/**
     * 查询sql查询语句信息
     * 
     * @param id sql查询语句ID
     * @return sql查询语句信息
     */
    @Override
	public SystemSqlquery selectSystemSqlqueryById(Integer id)
	{
	    return systemSqlqueryMapper.selectSystemSqlqueryById(id);
	}
	
	/**
     * 查询sql查询语句列表
     * 
     * @param systemSqlquery sql查询语句信息
     * @return sql查询语句集合
     */
	@Override
	public List<SystemSqlquery> selectSystemSqlqueryList(SystemSqlquery systemSqlquery)
	{
	    return systemSqlqueryMapper.selectSystemSqlqueryList(systemSqlquery);
	}
	
    /**
     * 新增sql查询语句
     * 
     * @param systemSqlquery sql查询语句信息
     * @return 结果
     */
	@Override
	public int insertSystemSqlquery(SystemSqlquery systemSqlquery)
	{
	    return systemSqlqueryMapper.insertSystemSqlquery(systemSqlquery);
	}
	
	/**
     * 修改sql查询语句
     * 
     * @param systemSqlquery sql查询语句信息
     * @return 结果
     */
	@Override
	public int updateSystemSqlquery(SystemSqlquery systemSqlquery)
	{
	    return systemSqlqueryMapper.updateSystemSqlquery(systemSqlquery);
	}

	/**
     * 删除sql查询语句对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteSystemSqlqueryByIds(String ids)
	{
		return systemSqlqueryMapper.deleteSystemSqlqueryByIds(Convert.toStrArray(ids));
	}
	
}
